package com.linln.modules.system.service.impl;

import com.linln.common.utils.ResultVoUtil;
import com.linln.common.vo.ResultVo;
import com.linln.modules.system.domain.Banner;
import com.linln.modules.system.repository.BannerRepository;
import com.linln.modules.system.service.BannerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author hyf
 * @date 2021/10/11
 */
@Slf4j
@Service
public class BannerServiceImpl implements BannerService {

    @Autowired
    private BannerRepository bannerRepository;


    @Override
    public ResultVo getBannerList() {

        List<Banner>  list = bannerRepository.findAll();
        log.info("获取BannerList");
        return ResultVoUtil.success(list);

    }
}